<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge" />
    <title>西京文交所管理端</title>
    <link rel="stylesheet" href="../../static/iconfont/iconfont.css" >
    <link rel="stylesheet" href="../../static/frameset.css" >
</head>
<body>

    <div id="J_wrap" class="m_wrap m_box_v p_index none">
        <div class="m_top">
            <headers v-on:callback="headerHandle" :userobj.sync="userobj"></headers>
        </div>
        <div class="m_content m_flex1 m_box">
            <menunav index="trade" sub="apply" :navobj.sync="userobj.group_acl"></menunav>
            <div class="container m_over_x m_flex1">
                <div class="taken_box">
                    <ul class="breadcrumbs">
                        <li><span>交易管理</span>&gt;</li>
                        <li><a href="apply.html">申购处理</a>&gt;</li>
                        <li class="on">申购详情</li>
                    </ul>
                    <div class="m_search m_box">
                        <div class="m_flex1">
                            <input type="text" class="m_input medium" maxlength="12" v-inputnumber placeholder="交易号" v-model="no">
                            <select class="m_select" v-model="status">
                                <option value="" disabled selected hidden>状态</option>
                                <option value="">全部</option>
                                <option value="1">待处理</option>
                                <option value="2">申购成功</option>
                                <option value="3">申购失败</option>
                                <option value="4">进行中</option>
                                <option value="5">已拒绝</option>
                                <option value="0">已取消</option>
                            </select>
                            <button class="m_btn line" v-on:click="reSearch">查询</button>
                            <button class="m_btn line" v-on:click="reset">重置</button>
                        </div>
                        <button class="m_btn" v-on:click="goApply" v-if="userobj.group_acl.trade.child.apply.child['detail/operate'].isOwn">处理申购</button>
                        <button class="m_btn line" v-on:click="showDeal" v-if="userobj.group_acl.trade.child.apply.child['operate/result'].isOwn">预处理</button>
                    </div>
                    <table class="m_table">
                        <thead>
                            <tr>
                                <th width="150">交易号</th>
                                <th>姓名</th>
                                <th>藏品ID</th>
                                <th>藏品名称</th>
                                <th>申购价格</th>
                                <th>申购量</th>
                                <th>申购手续费</th>
                                <th>额外冻结</th>
                                <th>冻结总价</th>
                                <th>实际中签量</th>
                                <th>状态</th>
                                <th>申购时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-if="list.length < 1">
                                <td colspan="13">
                                    <div class="tc">
                                        <template v-if="search">没有符合条件的内容</template>
                                        <template v-else>暂无数据</template>
                                    </div>
                                </td>
                            </tr>
                            <tr v-for="item in list" v-if="list.length > 0">
                                <td>{{ item.no }}</td>
                                <td>{{ item.name }}</td>
                                <td>{{ item.code }}</td>
                                <td><span class="m_textOver">{{ item.col_name }}</span></td>
                                <td>{{ item.price | markMoney }}</td>
                                <td>{{ item.total_cnt }}</td>
                                <td>{{ item.fee | markMoney }}</td>
                                <td>{{ item.other_frozen | markMoney }}</td>
                                <td>{{ item.total_frozen | markMoney }}</td>
                                <td>{{ item.current_cnt }}</td>
                                <td>{{ item.status | applyStatus }}</td>
                                <td>{{ item.time }}</td>
                                <td>
                                    <template v-if="item.status == 1 && userobj.group_acl.trade.child.apply.child['detail/refuse'].isOwn">
                                        <a href="javascript:void(0);" v-on:click="operate(item.id)">拒绝</a>
                                    </template>
                                    <template v-else>- -</template>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <pages :cur.sync="cur" :all.sync="all" v-on:btn-click="getData"></pages>
                </div>
            </div>
        </div>

        <!-- 弹出窗结构 -->
        <div class="m_boundingBox m_boundingBoxCenter {{ show ? 'on' : 'none'}}">
            <div class="m_boundingBox_inner">
                <div class="header">预处理结果</div>
                <div class="body">
                    <table class="m_detable">
                        <tbody>
                            <tr>
                                <th>用户申购量</th>
                                <td>{{ result.user_total_cnt }}</td>
                                <th>中签总量</th>
                                <td>{{ result.current_cnt }}</td>
                            </tr>
                            <tr>
                                <th>成功人数</th>
                                <td>{{ result.success_num }}</td>
                                <th>失败人数</th>
                                <td>{{ result.fail_num }}</td>
                            </tr>
                        </tbody>
                    </table>
                    <div class="tit">调整参数：</div>
                    <table class="m_fmtable">
                        <tbody>
                            <tr>
                                <th>申购总量</th>
                                <td>
                                    <input class="m_input" disabled type="text" v-model="result.total_cnt">
                                </td>
                            </tr>
                            <tr v-if="type != 2">
                                <th>市值分配量</th>
                                <td>
                                    <input class="m_input" type="text" v-model="assign_w" v-inputnumber>
                                </td>
                            </tr>
                            <tr v-if="type != 1">
                                <th>抢单分配量</th>
                                <td>
                                    <input class="m_input" type="text" v-model="assign_q" v-inputnumber>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="footer">
                    <div class="m_btn" v-on:click="preDeal">确定</div>
                    <div class="m_btn line" v-on:click="cancel">取消</div>
                </div>
            </div>
        </div>
    </div>


    <script src="../../js/plugins/zepto/zepto.min.js"></script>
    <script src="../../js/plugins/vue/vue.min.js"></script>
    <script src="../../js/plugins/seajs/sea.js"></script>
    <script src="../../js/plugins/seajs/seajs-text.js"></script>

    <script>
        seajs.use( "../../js/page/trade/apply_detail" );
    </script>

</body>
</html>
